package com.cloud.sysmana.entity.dao.impl;



import com.cloud.sysmana.dto.SysStore;
import com.cloud.sysmana.entity.SysItem;
import com.cloud.sysmana.entity.dao.ISysItemDao;
import com.cloud.util.base.BaseHibernateDao;
import com.cloud.util.other.StringUtil;
import com.cloud.util.page.PageInfo;

public class SysItemDao extends BaseHibernateDao<SysItem, Integer> implements ISysItemDao {
	
	
	/**
	 * 获取系统用户分页数据SQL
	 * @param pageInfo
	 * @return
	 */
	public PageInfo listItemPage(PageInfo pageInfo){
		
		String hsql = "FROM SysItem";
		String countSql = "SELECT COUNT(*) FROM SysItem";
		String whereSql = " where 1=1";
		
		
		
		pageInfo.setTotalCountHbSQL(countSql + whereSql);
		pageInfo.setListHbSql(hsql + whereSql);
		
		return pageInfo;
	}

	@Override
	public SysItem getItemById(Integer id) {
		// TODO Auto-generated method stub
		 return this.findById(id);
	}

	@Override
	public void saveOrUpdateItem(SysItem role) {
		this.updateEntity(role);
		
	}

	@Override
	public void delItem(SysItem role) {
		// TODO Auto-generated method stub
		this.deleteEntity(role);
	}
	
	

}
